package com.bidevalution.controller.api;

import java.util.HashMap;
import java.util.Map;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.bidevalution.business.context.ButtonDisplayPermission;
import com.qtp.core.model.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@RestController
@RequestMapping("/buttonDisplayPermission")
@Api(value = "环节页面配置")
public class ButtonDisplayPermissionController extends BaseController{
	@GetMapping("/getList")
	@ApiOperation(value = "查询按钮显示的所有配置权限", notes = "查询按钮显示的所有配置权限", response = HashMap.class)
	public Response<Map<String, Object>> selectList() {
		Map<String, Object> dataMap = new HashMap<String, Object>();
		for(ButtonDisplayPermission buttonDisplayPermission:ButtonDisplayPermission.values()) {
			dataMap.put(buttonDisplayPermission.getCode(), buttonDisplayPermission.getText());
		}
		return Response.ok(dataMap);
	}
}
